package com.czhouse.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.czhouse.pojo.User;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<User> {
    @Select("SELECT permissions FROM menus m LEFT JOIN role_menus rm\n" +
            "ON rm.`menu_id`=m.`id` LEFT JOIN USER u ON u.`role_id`=rm.`role_id`\n" +
            "WHERE u.`id`=${id}\n")
    List<String> selectPermissionById(Integer id);
}
